package com.fansl.koala.quickdev.common.enums;

import com.fansl.koala.quickdev.common.constants.CommonConstants;
import javafx.scene.input.KeyCodeCombination;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * @author fansl
 * @Description: 响应结果枚举
 * @date 2020/3/12 12:04
 */
@Getter
@AllArgsConstructor
public enum ResultEnum {
    /**
     * 失败
     */
    FAILED(CommonConstants.FAIL, "failed"),

    /**
     * 成功
     */
    SUCCESS(CommonConstants.SUCCESS, "success"),

    SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "server_error"),

    /**
     * 参数校验异常
     */
    CHECKED_EXCEPTION(400,"参数校验异常"),
    /**
     * 用户注册异常
     */
    REGISTER_ERROR(1001,"注册异常"),

    /**
     * 账号不存在
     */
    ACCOUNT_NOT_FOUND(1002,"账号不存在"),

    /**
     * 账号未激活
     */
    ACCOUNT_NOT_ACTIVATE(1003,"账号未激活"),

    /**
     * 账号已锁
     */
    ACCOUNT_LOCKED(1004,"账号已锁"),

    /**
     * 账号已经激活
     */
    ACCOUNT_ACTIVATED(1005,"账号已经激活"),

    /**
     * 账号激活邮件已经过期
     */
    ACCOUNT_ACTIVATED_EXPIRED(1006,"账号激活邮件已经过期"),

    /**
     * 账号激活码错误
     */
    ACCOUNT_ACTIVATED_ERROR(1007,"账号激活码错误"),

    /**
     * 密码错误
     */
    PASSWORD_ERROR(1008,"密码错误"),

    /**
     * 发送邮件异常
     */
    SEND_EMAIL_ERROR(1009,"发送邮件异常"),

    /**
     * 角色已存在
     */
    ROLE_EXIST(1010,"角色已存在"),

    /**
     * 未找到对应枚举
     */
    ENUM_NOTFOUND(1011,"未找到对应枚举"),
    ;

    private final Integer code;
    private final String message;
}
